package com.glsc.ngateway.opmanage.dto;

import cn.hutool.core.annotation.Alias;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * @author liwei
 * 交易单元租用信息-月度
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class TradeSeatFeesEmailMonthDto {

    @Alias(value = "交易单元号")
    @ApiModelProperty(value = "交易单元号")
    private String tradeSeatCode;

    @Alias(value = "交易单元名称")
    @ApiModelProperty(value = "交易单元名称")
    private String tradeSeatName;

//    @Alias(value = "交易类报盘数量(月)")
//    @ApiModelProperty(value = "交易类报盘数量(月)")
    private Integer tradingOfferAmount = 0;

//    @Alias(value = "非交易类报盘数量(月)")
//    @ApiModelProperty(value = "非交易类报盘数量(月)")
    private Integer noneTradingOfferAmount = 0;

    @Alias(value = "交易类报盘数量(月)")
    @ApiModelProperty(value = "交易类报盘数量(月)")
    private Integer tradingOfferYearAmount = 0;

    @Alias(value = "非交易类报盘数量(月)")
    @ApiModelProperty(value = "非交易类报盘数量(月)")
    private Integer noneTradingOfferYearAmount = 0;

    @Alias(value = "交易单元月费")
    @ApiModelProperty(value = "交易单元月费")
    private BigDecimal annualFees;

    @Alias(value = "交易单元使用费")
    @ApiModelProperty(value = "交易单元使用费")
    private BigDecimal useFees;

    @Alias(value = "交易单元流量费")
    @ApiModelProperty(value = "交易单元流量费")
    private BigDecimal flowFees;

    @Alias(value = "交易单元流速费")
    @ApiModelProperty(value = "交易单元流速费")
    private BigDecimal flowSpeedFees;

    @Alias(value = "计费起始时间")
    @ApiModelProperty(value = "计费起始时间")
    @DateTimeFormat(pattern = "yyyy-MM")
    @JsonFormat(pattern = "yyyy-MM")
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    private LocalDateTime chargeBeginDate;

    @Alias(value = "计费截止时间")
    @ApiModelProperty(value = "计费截止时间")
    @DateTimeFormat(pattern = "yyyy-MM")
    @JsonFormat(pattern = "yyyy-MM")
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    private LocalDateTime chargeEndDate;

    @ApiModelProperty(value = "流速权")
    private BigDecimal flowSpeedWeight = BigDecimal.ZERO;

}
